<?php 
/**
 * eBay Label Printing Program Payment Method Database Table Class 
 * this is a Db Table Class , It stores Payment Method Definations
 * It is a storage table, will only have basic functions
 * @package  eBayLabelPrinter
 * @category Models/DbTable
 * @author   Norman Dong <norman.dong@hotmail.com>
 * @version  Initial
 * @copyright LeadCasket.com
 * @link     www.leadcasket.com
 * @license  Commercial
 */
 class Model_DbTable_Assist_Paymentmethod extends Zend_Db_Table_Abstract 
{
	/**
	 * @var string Class Table Name
	 */
	protected $_name = 'assist_payment_method'; 
	/**
	 * Get payment method
	 * Really basic function 
	 * @param int $idPaymentMethod
	 * @return array  
	 */	
	public function getPaymentMethod($idPaymentMethod){
		$idPaymentMethod = (int) $idPaymentMethod;
		$row = $this->fetchRow('`id_payment_method` = '.$idPaymentMethod);
			if(!$row){
				return false;
			}
		return $row->toArray();
			
		}
	/**
	 * Get payment method Name	
	 * @param int $idPaymentMethod
	 * @return array
	 */		
	public function getPaymentMethodName($idPaymentMethod){
		$idPaymentMethod = (int) $idPaymentMethod;
		$row = $this->fetchRow('`id_payment_method` = '.$idPaymentMethod);
		if(!$row){
			return false;
		}
		
		$arrRow = $row->toArray();		
		return $arrRow['name_payment_method'];
		
	}
	/**
	 * List All payment method Name
	 * @return array Two Dimension array
	 */	
	public function listPaymentMethod(){
		$rows = $this->fetchAll('1');
		return $rows->toArray();
		
	}	
				
}
?>